Skip to content

Fix DoChannelOpen() and Add the regress test#919

Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
yosuke-wolfssl:f_2871
Apr 15, 2026
Merged

Fix DoChannelOpen() and Add the regress test#919
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
yosuke-wolfssl:f_2871

Conversation

@yosuke-wolfssl
Copy link
Copy Markdown
Contributor

This PR fixes DoChannelOpen() so that this rejects the request if no fwdCb is registered.
Also, this adds the regress test for the case.

@yosuke-wolfssl yosuke-wolfssl self-assigned this Apr 15, 2026
Copilot AI review requested due to automatic review settings April 15, 2026 04:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens DoChannelOpen() handling for direct-tcpip forwarding by rejecting channel open requests when no forwarding callback is registered, and adds a regression test to ensure a CHANNEL_OPEN_FAILURE response is sent in that scenario.

Changes:

  • Reject direct-tcpip channel opens in DoChannelOpen() when ssh->ctx->fwdCb is not set.
  • Add a regression test that sends a direct-tcpip channel-open without registering fwdCb and asserts an OPEN_FAILURE response.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/internal.c Adds explicit rejection behavior for direct-tcpip opens when forwarding callback is missing.
tests/regress.c Adds a regression test covering the “no fwdCb registered” direct-tcpip open failure behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/internal.c
@JacobBarthelmeh JacobBarthelmeh merged commit cdd6df0 into wolfSSL:master Apr 15, 2026
131 checks passed
@yosuke-wolfssl yosuke-wolfssl deleted the f_2871 branch April 16, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants